import request from '@/utils/request';

/** 获取列表 */
export const getListApi = (data: any) => {
    return request({
        url: '/system/customizedChildrenOrder/list',
        method: 'post',
        data: data
    })
};

/** 获取全部定制类型 */
export const getAllTypeApi = () => {
    return request({
        url: `/system/customizedType/getAllType`,
        method: 'get'
    });
};


/** 获取生产单详情 */
export const getOrderProduceDetailApi = (id: number) => {
    return request({
        url: '/system/customizedChildrenOrder/getOrderProduceDetail',
        method: 'get',
        params: { id }
    })
};

/** 获取编辑详情 */
export const getEditDetailApi = (id: number) => {
    return request({
        url: '/system/customizedChildrenOrder/getEditDetail',
        method: 'get',
        params: { id }
    })
};

/** 修改编辑详情 */
export const putEditDetailApi = (data: any) => {
    return request({
        url: '/system/customizedChildrenOrder/saveOrderDetail',
        method: 'put',
        data: data
    })
};

/** 删除生产单 */
export const deleteOrderApi = (id: number) => {
    return request({
        url: `/system/customizedChildrenOrder/${id}`,
        method: 'delete',
    })
};